<template>
  <div class="dashboard">
    <div class="one">
      <div class="one-left">
        <div class="ol-top">
          <img src="../assets/dashboard-banner-left.png" class="img-left" />
          <img src="../assets/dashboard-banner-right.png" class="img-right" />
          <div class="text-1">
            <div class="text-1-1">
              <img src="../assets/avatar.jpg" class="user-avatar" />
              <div class="user-name">仓库管理员</div>
            </div>
            <div class="text-1-2">
              <div class="text-1-2-1">我不是为了输赢，我就是认真！</div>
              <div class="text-1-2-2">—— 罗永浩</div>
            </div>
          </div>
          <div class="text-2">
            <div class="site">北京总仓</div>
          </div>
        </div>
        <div class="ol-bottom">
          <div>待办信息</div>
          <div class="item-list">
            <div class="item">
              <RouterLink to="/manage-storage-in/list-in/list">
                <div class="iw-top">
                  <div class="icon-wrap">
                    <MenuUnfoldOutlined />
                  </div>
                  <div class="icon-text">入库单</div>
                </div>
                <div class="iw-bottom">
                  <div>新增 <span class="iwb-1">3</span></div>
                  <div>待审核 <span class="iwb-2">9</span></div>
                </div>
              </RouterLink>
            </div>
            <div class="item">
              <RouterLink to="/manage-storage-out/list-out">
                <div class="iw-top">
                  <div class="icon-wrap" style="background: rgb(255, 178, 0)">
                    <MenuFoldOutlined />
                  </div>
                  <div class="icon-text">出库单</div>
                </div>
                <div class="iw-bottom">
                  <div>新增 <span class="iwb-1">3</span></div>
                  <div>待审核 <span class="iwb-2" style="color: rgb(255, 178, 0)">9</span></div>
                </div>
              </RouterLink>
            </div>
            <div class="item">
              <RouterLink to="/manage-storage/list">
                <div class="iw-top">
                  <div class="icon-wrap" style="background: rgb(255, 113, 0)">
                    <FileSearchOutlined />
                  </div>
                  <div class="icon-text">盘点单</div>
                </div>
                <div class="iw-bottom">
                  <div>新增 <span class="iwb-1">3</span></div>
                  <div>待审核 <span class="iwb-2" style="color: rgb(255, 113, 0)">9</span></div>
                </div>
              </RouterLink>
            </div>
          </div>
        </div>
      </div>
      <div class="one-right">
        <div class="subject">通知/公告</div>
        <div class="item" v-for="item in 5" :key="item">
          <div class="hr"></div>
          <div class="title">紧急盘点通知</div>
          <div class="time">2020.12.30 18:23:14</div>
        </div>
      </div>
    </div>
    <div class="two">2</div>
    <div class="three">3</div>
    <div class="four">4</div>
  </div>
</template>

<script setup>
import { MenuFoldOutlined, MenuUnfoldOutlined, FileSearchOutlined } from '@ant-design/icons-vue'
</script>

<style lang="scss">
.dashboard {
  .one {
    display: flex;
    .one-left {
      flex: 1;
      margin-right: 30px;
    }
    .one-right {
      width: 260px;
      height: 451px;
      background: #fff;
      box-shadow: 0 0 6px 0 rgba(144, 142, 142, 0.17);
      border-radius: 12px;
      padding: 30px;
    }
  }
}
.ol-top {
  position: relative;
  width: 100%;
  height: 150px;
  background: linear-gradient(270deg, #ffc771, #ffa634);
  box-shadow: 0 0 6px 0 rgba(188, 151, 69, 0.12);
  border-radius: 12px;
  display: flex;
  .img-left {
    position: absolute;
    top: 0;
    left: 0;
    height: 150px;
  }
  .img-right {
    position: absolute;
    top: 0;
    right: 0;
    height: 150px;
  }
}
.text-1 {
  flex: 1;
  z-index: 1;
  display: flex;
  .text-1-1 {
    width: 166px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .user-avatar {
      height: 62px;
      border-radius: 50%;
    }
    .user-name {
      margin-top: 15px;
    }
  }
  .text-1-2 {
    flex: 1;
    font-family:
      PingFangSC-Medium,
      PingFang SC;
    font-weight: 500;
    color: #fff;
    line-height: 25px;
    font-size: 18px;
    margin-top: 35px;
    margin-left: 50px;
    .text-1-2-2 {
      margin-left: 200px;
      margin-top: 10px;
    }
  }
}
.text-2 {
  z-index: 1;
  width: 200px;
  margin-top: 35px;
  padding-left: 30px;
  .site {
    width: 147px;
    height: 40px;
    background: #f8f5f5;
    border-radius: 6px;
    opacity: 0.79;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
  }
}
.ol-bottom {
  width: 100%;
  height: 282px;
  background: #fff;
  box-shadow: 0 0 6px 0 rgba(144, 142, 142, 0.17);
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
}
.item-list {
  display: flex;
  margin-top: 20px;
  margin-left: -15px;
  margin-right: -15px;
  .item {
    padding-left: 15px;
    padding-right: 15px;
    flex: 1 1 33.33%;
    a {
      display: block;
      position: relative;
      height: 186px;
      background: #fbf7f7;
      border-radius: 8px;
      padding: 20px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      text-decoration: none;
      color: black;
      &:hover {
        background: hsla(0, 0%, 100%, 0.8);
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
        border-radius: 8px;
        border: 1px solid #f5efee;
      }
    }
  }
}
.iw-top {
  display: flex;
  align-items: center;
  .icon-wrap {
    width: 49px;
    height: 49px;
    background: #0076ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    .anticon {
      color: white;
      font-size: 28px;
      font-weight: bold;
    }
  }
  .icon-text {
    margin-left: 20px;
  }
}
.iw-bottom {
  display: flex;
  font-size: 14px;
  font-family:
    PingFangSC-Regular,
    PingFang SC;
  font-weight: 400;
  color: #887e7e;
  margin-right: 10px;
  vertical-align: super;
  .iwb-1 {
    font-size: 36px;
    font-family: DIN-Medium, DIN;
    font-weight: 500;
    color: #332929;
    margin-right: 20px;
  }
  .iwb-2 {
    font-size: 36px;
    font-family: DIN-Medium, DIN;
    font-weight: 500;
    color: rgb(0, 118, 255);
    margin-right: 20px;
  }
}

.subject {
  font-size: 16px;
  font-family:
    PingFangSC-Semibold,
    PingFang SC;
  font-weight: 600;
  color: #332929;
  line-height: 22px;
}
.item {
  margin-top: 15px;
  .hr {
    width: 201px;
    height: 1px;
    background-color: #f5efee;
  }
  .title {
    width: 195px;
    height: 18px;
    font-size: 13px;
    font-family:
      PingFangSC-Regular,
      PingFang SC;
    font-weight: 400;
    color: #332929;
    line-height: 18px;
    margin-top: 15px;
  }
  .time {
    width: 115px;
    height: 17px;
    font-size: 12px;
    font-family:
      PingFangSC-Regular,
      PingFang SC;
    font-weight: 400;
    color: #887e7e;
    line-height: 17px;
    margin-top: 10px;
  }
}
</style>
